package com.wgq.TestPaiXu;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;

public class utilTeiZi {
    public static void main(String[] args) {
        List<teiZi> list = new ArrayList<teiZi>();
        list.add(new teiZi("王",10,new Date()));
        list.add(new teiZi("国",12,new Date(System.currentTimeMillis()-1000*60*60)));
        list.add(new teiZi("庆",14,new Date(System.currentTimeMillis()-2000*60*60)));
        System.out.println("排序前:"+list);
        Collections.sort(list);
        System.out.println("排序后:"+list);
        System.out.println();
    }
}
